using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._PointCloud
{
    /// <summary>
    /// <para>Extract LAS</para>
    /// <para>Creates new LAS files from point cloud data in a LAS dataset or point cloud scene layer.</para>
    /// <para>根据 LAS 数据集或点云场景图层中的点云数据创建新的 LAS 文件。</para>
    /// </summary>    
    [DisplayName("Extract LAS")]
    public class ExtractLas : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExtractLas()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input Point Cloud</para>
        /// <para>The LAS dataset or point cloud scene layer to process.</para>
        /// <para>要处理的 LAS 数据集或点云场景图层。</para>
        /// </param>
        /// <param name="_target_folder">
        /// <para>Target Folder</para>
        /// <para>The existing folder to which the output .las files will be written.</para>
        /// <para>输出 .las 文件将写入到的现有文件夹。</para>
        /// </param>
        public ExtractLas(object _in_las_dataset, object _target_folder)
        {
            this._in_las_dataset = _in_las_dataset;
            this._target_folder = _target_folder;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Extract LAS";

        public override string CallName => "3d.ExtractLas";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _target_folder, _extent, _boundary, _process_entire_files.GetGPValue(), _name_suffix, _remove_vlr.GetGPValue(), _rearrange_points.GetGPValue(), _compute_stats.GetGPValue(), _out_las_dataset, _out_folder, _compression.GetGPValue()];

        /// <summary>
        /// <para>Input Point Cloud</para>
        /// <para>The LAS dataset or point cloud scene layer to process.</para>
        /// <para>要处理的 LAS 数据集或点云场景图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Point Cloud")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Target Folder</para>
        /// <para>The existing folder to which the output .las files will be written.</para>
        /// <para>输出 .las 文件将写入到的现有文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Folder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_folder { get; set; }


        /// <summary>
        /// <para>Processing Extent</para>
        /// <para><xdoc>
        ///   <para>The extent of the data that will be evaluated.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union of Inputs—The extent will be based on the maximum extent of all inputs.</bullet_item><para/>
        ///     <bullet_item>Intersection of Inputs—The extent will be based on the minimum area common to all inputs.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将评估的数据范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>输入并集 - 范围将基于所有输入的最大范围。</bullet_item><para/>
        ///     <bullet_item>输入交点 - 范围将基于所有输入共有的最小面积。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Extraction Boundary</para>
        /// <para>A polygon boundary that defines the area of the .las files that will be clipped.</para>
        /// <para>定义要裁剪的 .las 文件区域的多边形边界。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extraction Boundary")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _boundary { get; set; } = null;


        /// <summary>
        /// <para>Process entire LAS files that intersect extent</para>
        /// <para><xdoc>
        ///   <para>Specifies how the area of interest will be used in determining how .las files will be processed. The area of interest is defined by the Processing Extent parameter value, the Processing Boundary parameter value, or a combination of both.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Only LAS points that intersect the area of interest will be processed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—If any portion of a .las file intersects the area of interest, all the points in that .las file, including those outside the area of interest, will be processed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在确定如何处理 .las 文件时如何使用感兴趣区域。感兴趣区域由“处理范围”参数值、“处理边界”参数值或两者的组合定义。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中—仅处理与感兴趣区域相交的 LAS 点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 如果 .las 文件的任何部分与感兴趣区域相交，则将处理该 .las 文件中的所有点，包括感兴趣区域之外的点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Process entire LAS files that intersect extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _process_entire_files_value _process_entire_files { get; set; } = _process_entire_files_value._false;

        public enum _process_entire_files_value
        {
            /// <summary>
            /// <para>PROCESS_ENTIRE_FILES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PROCESS_ENTIRE_FILES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>PROCESS_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PROCESS_EXTENT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output File Name Suffix</para>
        /// <para>The text that will be appended to the name of each output .las file. Each file will inherit its base name from its source file, followed by the suffix specified in this parameter.</para>
        /// <para>将追加到每个输出 .las 文件的名称的文本。每个文件都将从其源文件继承其基本名称，后跟此参数中指定的后缀。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File Name Suffix")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _name_suffix { get; set; } = null;


        /// <summary>
        /// <para>Remove Variable Length Records</para>
        /// <para><xdoc>
        ///   <para>Specifies whether variable length records (VLRs) will be removed. Each .las file may potentially contain a set of VLRs that were added by the software that produced it. The meaning of these records is typically only known by the originating software. Unless the output LAS data will be processed by an application that understands this information, retaining the VLRs may not provide any value-added functionality. Removing the VLRs can potentially save significant disk space depending on their total size and the number of files containing them.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The variable length records in the input .las files will not be removed and will remain in the output .las files. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The variable length records in the input .las files will be removed from the output .las files.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否删除可变长度记录 （VLR）。每个 .las 文件都可能包含一组由生成它的软件添加的 VLR。这些记录的含义通常只有原始软件才能知道。除非输出 LAS 数据将由理解此信息的应用程序处理，否则保留 VLR 可能无法提供任何增值功能。删除 VLR 可能会节省大量磁盘空间，具体取决于其总大小和包含它们的文件数。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 输入 .las 文件中的可变长度记录不会被移除，而是保留在输出 .las 文件中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 输入 .las 文件中的可变长度记录将从输出 .las 文件中移除。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Remove Variable Length Records")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _remove_vlr_value _remove_vlr { get; set; } = _remove_vlr_value._false;

        public enum _remove_vlr_value
        {
            /// <summary>
            /// <para>REMOVE_VLR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REMOVE_VLR")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>MAINTAIN_VLR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MAINTAIN_VLR")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Rearrange points</para>
        /// <para><xdoc>
        ///   <para>Specifies whether points in the .las files will be rearranged.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The order of the points in the .las files will not be rearranged.</bullet_item><para/>
        ///     <bullet_item>Checked—The points in the .las files will be rearranged. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否重新排列 .las 文件中的点。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会重新排列 .las 文件中点的顺序。</bullet_item><para/>
        ///     <bullet_item>选中 - 将重新排列 .las 文件中的点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rearrange points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _rearrange_points_value _rearrange_points { get; set; } = _rearrange_points_value._true;

        public enum _rearrange_points_value
        {
            /// <summary>
            /// <para>REARRANGE_POINTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REARRANGE_POINTS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>MAINTAIN_POINTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MAINTAIN_POINTS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Compute Statistics</para>
        /// <para><xdoc>
        ///   <para>Specifies whether statistics will be computed for the .las files referenced by the LAS dataset. Computing statistics provides a spatial index for each .las file, which improves analysis and display performance. Statistics also enhance the filtering and symbology experience by limiting the display of LAS attributes, such as classification codes and return information, to values that are present in the .las file.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Statistics will be computed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Statistics will not be computed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为 LAS 数据集引用的 .las 文件计算统计数据。计算统计为每个 .las 文件提供空间索引，从而提高分析和显示性能。统计数据还通过将 LAS 属性（如分类代码和返回信息）的显示限制为 .las 文件中存在的值来增强过滤和符号系统体验。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将计算统计数据。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—不计算统计数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compute Statistics")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compute_stats_value _compute_stats { get; set; } = _compute_stats_value._true;

        public enum _compute_stats_value
        {
            /// <summary>
            /// <para>COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COMPUTE_STATS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_COMPUTE_STATS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output LAS Dataset</para>
        /// <para>The output LAS dataset referencing the newly created .las files.</para>
        /// <para>引用新创建的 .las 文件的输出 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_las_dataset { get; set; } = null;


        /// <summary>
        /// <para>Output Folder</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Folder")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_folder { get; set; }


        /// <summary>
        /// <para>Compression</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the output .las file will be in a compressed format or the standard LAS format.</para>
        ///   <bulletList>
        ///     <bullet_item>Same As Input—The compression will be the same as the input. This option is only available when the input is a LAS dataset It is the default in that case.</bullet_item><para/>
        ///     <bullet_item>No Compression—The output will be in the standard LAS format (*.las). This is the default when the input is a point cloud scene layer.</bullet_item><para/>
        ///     <bullet_item>zLAS Compression—Output .las files will be compressed in the zLAS format.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出 .las 文件是压缩格式还是标准 LAS 格式。</para>
        ///   <bulletList>
        ///     <bullet_item>与输入相同 - 压缩将与输入相同。仅当输入为 LAS 数据集时，此选项才可用，在这种情况下，此选项是默认值。</bullet_item><para/>
        ///     <bullet_item>无压缩—输出将采用标准 LAS 格式 （*.las）。当输入为点云场景图层时，这是默认设置。</bullet_item><para/>
        ///     <bullet_item>zLAS 压缩—输出 .las 文件将以 zLAS 格式进行压缩。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compression_value _compression { get; set; } = _compression_value._SAME_AS_INPUT;

        public enum _compression_value
        {
            /// <summary>
            /// <para>Same As Input</para>
            /// <para>Same As Input—The compression will be the same as the input. This option is only available when the input is a LAS dataset It is the default in that case.</para>
            /// <para>与输入相同 - 压缩将与输入相同。仅当输入为 LAS 数据集时，此选项才可用，在这种情况下，此选项是默认值。</para>
            /// </summary>
            [Description("Same As Input")]
            [GPEnumValue("SAME_AS_INPUT")]
            _SAME_AS_INPUT,

            /// <summary>
            /// <para>No Compression</para>
            /// <para>No Compression—The output will be in the standard LAS format (*.las). This is the default when the input is a point cloud scene layer.</para>
            /// <para>无压缩—输出将采用标准 LAS 格式 （*.las）。当输入为点云场景图层时，这是默认设置。</para>
            /// </summary>
            [Description("No Compression")]
            [GPEnumValue("NO_COMPRESSION")]
            _NO_COMPRESSION,

            /// <summary>
            /// <para>zLAS Compression</para>
            /// <para>zLAS Compression—Output .las files will be compressed in the zLAS format.</para>
            /// <para>zLAS 压缩—输出 .las 文件将以 zLAS 格式进行压缩。</para>
            /// </summary>
            [Description("zLAS Compression")]
            [GPEnumValue("ZLAS")]
            _ZLAS,

        }

        public ExtractLas SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}